Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #272172: Remove tuplets after inserting measures causes corruption/crash #3662

Merged
merged 1 commit into from
May 21, 2018

Conversation

mattmcclinch
Copy link
Contributor

@mattmcclinch mattmcclinch commented May 8, 2018

@anatoly-os
Copy link
Contributor

According to the codestyle in master, we avoid using Q* constainers and prefer STL ones. With std::set we have to use [count(obj) != 0] instead of contains(obj).

@mattmcclinch
Copy link
Contributor Author

Thanks for the tip! That's much nicer than using std::find().

…n/crash

fix #272185: Delete a measure containing some tuplets + rest leads to corruption after inserting a measure
@mattmcclinch
Copy link
Contributor Author

I changed this to use std::set instead of QSet. But I do not like the idea of counting the number of times an object appears in a set. The set either contains the object or it does not.

@anatoly-os
Copy link
Contributor

std::set is optimized in this place and never slower than find().

@anatoly-os
Copy link
Contributor

@mattmcclinch did you check whether your fix work with an embedded tuplets?

@anatoly-os anatoly-os merged commit 344d332 into musescore:master May 21, 2018
anatoly-os added a commit to anatoly-os/MuseScore that referenced this pull request May 21, 2018
@anatoly-os
Copy link
Contributor

Manually merged to 2.3 as well. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants